//开启页接口
export const commonYunchanTest = (data) =>
  uni.http({
    url: 'api/common/yunchan_test',
    method: 'post',
    data,
    requestType: 'bl',
  })
// 新增名片
export const userCardAdd = (data) =>
  uni.http({
    url: 'yc/UserCard/add',
    method: 'post',
    data,
    requestType: 'bl',
  })
// 名片详情
export const getUserCardDetail = (data) =>
  uni.http({
    url: 'yc/UserCard/edit',
    method: 'get',
    data,
    requestType: 'bl',
  })
// 名片编辑
export const postUserCardEdit = (data) =>
  uni.http({
    url: 'yc/UserCard/edit',
    method: 'post',
    data,
    requestType: 'bl',
  })
// 名片删除
export const userCardDelete = (data) =>
  uni.http({
    url: 'yc/UserCard/delete',
    method: 'post',
    data,
    requestType: 'bl',
  })

//宝宝足月
export const termBabyFull = (data) =>
  uni.http({
    url: 'yc/Homepage/babyHorizontalBar',
    method: 'get',
    data,
    requestType: 'bl',
  })
// 开启孕产跟踪
export const getOpenYczz = (data) =>
  uni.http({
    url: 'yc/Doctor/openYczz',
    method: 'get',
    data,
    requestType: 'bl',
  })

//孕产科普/动态
export const getPopularization = (data) =>
  uni.http({
    url: '/yc/Homepage/yyEncyclopedia',
    method: 'get',
    data,
    requestType: 'bl',
  })
// 医生列表
export const getDoctorList = (data) =>
  uni.http({
    url: 'yc/Doctor/list',
    method: 'get',
    data,
    requestType: 'bl',
  })
//服务/商品列表
export const getServiceProductData = (data) =>
  uni.http({
    url: '/yc/Homepage/yyProduct',
    method: 'get',
    data,
    requestType: 'bl',
  })
// 医生详情
export const getDoctorInfo = (data) =>
  uni.http({
    url: 'yc/Doctor/info',
    method: 'get',
    data,
    requestType: 'bl',
  })
// 慢病医生列表医生
export const getMbDoctorList = (data) =>
  uni.http({
    url: 'mb/doctor/doctor_lst',
    method: 'get',
    data,
    requestType: 'bl',
  })

//宝宝出生
export const setBabyBirth = (data) =>
  uni.http({
    url: '/yc/Homepage/babyBirth',
    method: 'get',
    data,
    requestType: 'bl',
  })
// 医生报价单
export const getDoctorQuoteInfo = (data) =>
  uni.http({
    url: 'yc/Doctor/quoteInfo',
    method: 'get',
    data,
    requestType: 'bl',
  })

//产检列表/记录
export const getPrenatalExamination = (data) =>
  uni.http({
    url: '/yc/PrenatalExamination/list',
    method: 'get',
    data,
    requestType: 'bl',
  })

// 聊天查询产检列表
export const getsendred = (data) =>
  uni.http({
    url: 'yc/SendRecord/sendPrenatal',
    method: 'get',
    data,
    requestType: 'bl',
  })
//用户开启消息推送
export const getOpenPush = (data) =>
  uni.http({
    url: '/yc/UserCard/openPush',
    method: 'get',
    data,
    requestType: 'bl',
  })
//产检列表设置产检日期
export const editCheckDate = (data) =>
  uni.http({
    url: '/yc/PrenatalExamination/editCheckDate',
    method: 'get',
    data,
    requestType: 'bl',
  })
// 绑定医生
export const getBindDoctor = (data) =>
  uni.http({
    url: 'yc/UserCard/bindDoctor',
    method: 'get',
    data,
    requestType: 'bl',
  })
//产检主页个人信息
export const getAntenatalUserinfo = (data) =>
  uni.http({
    url: 'yc/PrenatalExamination/identityStatus',
    method: 'get',
    data,
    requestType: 'bl',
  })
//报告详情
export const getReportDetail = (data) =>
  uni.http({
    url: '/yc/PrenatalExamination/reportDetail',
    method: 'get',
    data,
    requestType: 'bl',
  })
//产检详情页
export const getAntenatalDetail = (data) =>
  uni.http({
    url: '/yc/PrenatalExamination/recordDetails',
    method: 'get',
    data,
    requestType: 'bl',
  })
//保存报告/草稿箱
export const saveEditApi = (data) =>
  uni.http({
    url: '/yc/PrenatalExamination/uploadReport',
    method: 'post',
    data,
    requestType: 'bl',
  })
// 保存草稿箱
export const getDraftAdd = (data) =>
  uni.http({
    url: 'yc/UserCard/draftAdd',
    method: 'post',
    data,
    requestType: 'bl',
  })
//添加个人产检记录
export const addInspectRecord = (data) =>
  uni.http({
    url: '/yc/PrenatalExamination/addInspectRecord',
    method: 'post',
    data,
    requestType: 'bl',
  })
//获取个人自增产检项目
export const getProjectInfo = (data) =>
  uni.http({
    url: '/yc/PrenatalExamination/selfIncProject',
    method: 'post',
    data,
    requestType: 'bl',
  })
//用户自增产检记录获取默认名称
export const getInspectDefault = (data) =>
  uni.http({
    url: '/yc/PrenatalExamination/inspectDefault',
    method: 'get',
    data,
    requestType: 'bl',
  })
// 草稿箱详情
export const getDraftInfo = (data) =>
  uni.http({
    url: 'yc/UserCard/draftInfo',
    method: 'get',
    data,
    requestType: 'bl',
  })
// 聊天记录信息
export const getChatLogList = (data) =>
  uni.http({
    url: 'doctorapp/v1/chat_log',
    method: 'get',
    data,
    requestType: 'app',
  })

// 获取 医生 与 用户 聊天记录

export const getdoctorChatlist = (data) =>
  uni.http({
    url: 'doctorapp/v1/chatLog',
    method: 'get',
    data,
    requestType: 'app',
  })

// 清空聊天记录信息
export const delAllList = (data) =>
  uni.http({
    url: 'doctorapp/v1/chat_del_all',
    method: 'get',
    data,
    requestType: 'app',
  })

// 清空聊天记录信息
export const SleepRecord = (data) =>
  uni.http({
    url: '/yc/SleepRecord/dateList',
    method: 'get',
    data,
    requestType: 'bl',
  })
//体重管理
// 获取本日体重信息
export const getTodayWeight = (data) =>
  uni.http({
    url: '/yc/Weight/get_today_weight',
    method: 'get',
    data,
    requestType: 'bl',
  })

// 记录体重
export const setRecordWeight = (data) =>
  uni.http({
    url: '/yc/Weight/user_set_weight',
    method: 'get',
    data,
    requestType: 'bl',
  })
// 体重记录
export const getRecordWeight = (data) =>
  uni.http({
    url: '/yc/Weight/user_get_weight',
    method: 'get',
    data,
    requestType: 'bl',
  })
// 编辑体重
export const changeRecordWeight = (data) =>
  uni.http({
    url: '/yc/Weight/user_change_weight',
    method: 'get',
    data,
    requestType: 'bl',
  })
// 删除体重记录
export const delRecordWeight = (data) =>
  uni.http({
    url: 'yc/Weight/user_del_weight',
    method: 'get',
    data,
    requestType: 'bl',
  })
// 获取BMI指数
export const getBmiInfo = (data) =>
  uni.http({
    url: '/yc/Weight/get_bmi_info',
    method: 'get',
    data,
    requestType: 'bl',
  })
// 获取睡眠平均时长
export const getAverage = (data) =>
  uni.http({
    url: '/yc/SleepRecord/average',
    method: 'get',
    data,
    requestType: 'bl',
  })
// 获取运动平均时长
export const getMotionRecordAverage = (data) =>
  uni.http({
    url: '/yc/MotionRecord/average',
    method: 'get',
    data,
    requestType: 'bl',
  })
//添加睡眠时间
export const addRecordSleep = (data) =>
  uni.http({
    url: '/yc/SleepRecord/recordSleep',
    method: 'post',
    data,
    requestType: 'bl',
  })
// 获取选定日期的睡眠记录
export const getSleepDateRecord = (data) =>
  uni.http({
    url: '/yc/SleepRecord/dateRecord',
    method: 'get',
    data,
    requestType: 'bl',
  })
// 编辑睡眠时间
export const editSleepDateRecord = (data) =>
  uni.http({
    url: '/yc/SleepRecord/editRecord',
    method: 'post',
    data,
    requestType: 'bl',
  })
// 删除睡眠记录
export const delSleepRecord = (data) =>
  uni.http({
    url: '/yc/SleepRecord/delRecord',
    method: 'get',
    data,
    requestType: 'bl',
  })
// 获取睡眠日期记录
export const getSleepDateList = (data) =>
  uni.http({
    url: '/yc/SleepRecord/dateList',
    method: 'get',
    data,
    requestType: 'bl',
  })
// 获取用户记录的第一天的日期
export const getRecordStartDate = (data) =>
  uni.http({
    url: '/yc/SleepRecord/recordStartDate',
    method: 'get',
    data,
    requestType: 'bl',
  })
